Verify Mobile OTP
This document outlines the details of the Verify Mobile OTP API.
API Description
Objective
The Verify Mobile OTP validates the one-time password (OTP) sent to the user's phone for verification through the Send Mobile OTP API.
| Input | Output |
|---|---|
| The user's mobile number and the OTP received on it | A JSON response reflecting verification success or failure |
API URL
https://ind-engine.thomas.hyperverge.co/v1/verifyMobileOtp
API Endpoint
verifyMobileOtp
API Request Details
Overview
The API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format, and you should upload all images and files as form-data through a POST request.
Authentication
You need a unique pair of application ID (appId) and application key (appKey) from HyperVerge to verify your identity for accessing the API.
Method - POST
Headers
| Parameter | Mandatory or Optional | Description | Allowed Values |
|---|---|---|---|
| content-type | Mandatory | The media type for the request payload. | application/json |
| appId | Mandatory | The application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab. | This should be a unique value. |
| appKey | Mandatory | The application key shared by HyperVerge. You can find the details in the dashboard's credentials tab. | This should be a unique value. |
| transactionId | Mandatory | A unique identifier for tracking a user journey. | This should be both unique and easily associated with the user's journey in your application(s). |
Inputs
| Parameter | Description | Mandatory or Optional | Allowed Values | Default Value |
|---|---|---|---|---|
mobileNumber | The mobile number that was registered in the Send Mobile OTP API, on which the OTP was received | Mandatory | A valid ten-digit phone number | Not Applicable |
otp | The OTP received on the user's mobile number, after the execution of the Send Mobile OTP API | Mandatory | Not Applicable | Not Applicable |
Request
The following is a standard cURL request for the API.
curl --location --request POST 'https://ind-engine.thomas.hyperverge.co/v1/verifyMobileOtp' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_HyperVerge_transactionID>' \
--data '{
"mobileNumber": "<Enter_the_phone_number_of_the_user>",
"otp": "<Enter_the_OTP>"
}'
Success Response
The following is a successful response sample.
{
"status": "success",
"statusCode": 200,
"message": "OTP successfully verified",
"metaData": {
"requestId": "<Request_Identifier>"
}
}